<%@taglib uri="/WEB-INF/struts-html.tld"  prefix="html"%>
<%@taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@taglib uri="/WEB-INF/struts-bean.tld"  prefix="bean"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<table cellpadding="1" cellspacing="1" width="100%">
    <tr class="netral">
        <td colspan="2"><bean:message key="siswa.kartu"/></td>
    </tr>
    <tr>
        <td width="100%" colspan="2">
            <table cellpadding="1" cellspacing="1" width="100%">
                <tr class="header">
                    <td><bean:message key="label.no"/></td>
                    <td><bean:message key="siswa.kartu"/></td>
                    <td><bean:message key="siswa.nama"/></td>
                </tr>
                <logic:empty name="listSiswaCard">
                    <tr class="form">
                        <td colspan="3" align="center"><bean:message key="siswa.kartu"/> <bean:message key="label.isEmpty"/></td>
                    </tr>
                </logic:empty>
                <logic:notEmpty name="listSiswaCard">
                    <c:forEach var="listSiswaCard" items="${listSiswaCard}" varStatus="row">
                        <c:if test="${(row.count) % 2 == 0}"><tr class="over"></c:if>
                        <c:if test="${(row.count) % 2 != 0}"><tr class="down"></c:if>
                            <td width="5%"><c:out value="${row.count}"/></td>
                            <td width="20%" align="left"><c:out value="${listSiswaCard.noCard}"/></td>
                            <td align="left"><c:out value="${listSiswaCard.nama}"/></td>
                        </tr>
                    </c:forEach>
                </logic:notEmpty>
            </table>
        </td>
    </tr>
    <tr class="netral">
        <td colspan="2"><bean:message key="siswa.relasi"/></td>
    </tr>
    <tr>
        <td colspan="2">
            <table cellpadding="1" cellspacing="1" width="100%">
                <tr class="header">
                    <td><bean:message key="label.no"/></td>
                    <td><bean:message key="siswa.nama"/></td>
                    <td><bean:message key="siswa.umur"/></td>
                    <td><bean:message key="siswa.relasi"/></td>
                </tr>
                <logic:empty name="listSiswaRelation">
                    <tr class="form">
                        <td colspan="4" align="center"><bean:message key="siswa.relasi"/> <bean:message key="label.isEmpty"/></td>
                    </tr>
                </logic:empty>
                <logic:notEmpty name="listSiswaRelation">
                    <c:forEach var="listSiswaRelation" items="${listSiswaRelation}" varStatus="row">
                        <c:if test="${(row.count) % 2 == 0}"><tr class="over"></c:if>
                        <c:if test="${(row.count) % 2 != 0}"><tr class="down"></c:if>
                            <td width="5%"><c:out value="${row.count}"/></td>
                            <td width="65%"><c:out value="${listSiswaRelation.nama}"/></td>
                            <td width="5%"><c:out value="${listSiswaRelation.umur}"/></td>
                            <td width="35"><c:out value="${listSiswaRelation.relasi}"/></td>
                        </tr>
                    </c:forEach>
                </logic:notEmpty>
            </table>
        </td>
    </tr>
    <tr class="netral">
        <td colspan="2"><bean:message key="siswa.siswa"/></td>
    </tr>
    <tr class="form">
        <td width="10%"><bean:message key="siswa.kode"/></td>
        <td>: <c:out value="${detailSiswa.kode}"/></td>
    </tr>
    <tr class="form">
        <td><bean:message key="siswa.nama"/></td>
        <td>: <c:out value="${detailSiswa.nama}"/></td>
    </tr>
    <tr class="form">
        <td><bean:message key="siswa.alamat"/></td>
        <td>: <c:out value="${detailSiswa.alamat}"/></td>
    </tr>
    <tr class="form">
        <td><bean:message key="siswa.telp"/></td>
        <td>: <c:out value="${detailSiswa.telp}"/></td>
    </tr>
    <tr class="form">
        <td><bean:message key="siswa.golonganDarah"/></td>
        <td>: <c:out value="${detailSiswa.golonganDarah}"/></td>
    </tr>
    <!--tr class="form">
        <td><bean:message key="siswa.user"/></td>
        <td>: <c:out value="${detailSiswa.user.nama}"/></td>
    </tr-->
    <tr class="form">
        <td colspan="2" align="right"><html:submit onclick="history.back()"><bean:message key="label.back"/></html:submit></td>
    </tr>
</table>